package com.atstudy.dao;

import com.atstudy.entites.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2023/2/10 16:13
 * @copyright: 博为峰
 */
@Repository("accountDao")
public class AccountDaoImpl implements AccountDao {

    @Autowired
    public DataSource dataSource;

    @Override
    public List<Account> selectAccountList() {
        System.out.println("AccountDaoImpl");
        try {
            System.out.println(dataSource.getConnection());
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return new ArrayList<Account>();
    }
}
